%% process_plot
function process_plot(mesh, pde, U, basis_type, varargin)
x = mesh.node(:,1);
y = mesh.node(:,2);
if isempty(varargin)
    figure;
    if strcmp(basis_type, "P1")
        x = x(1:mesh.Np);
        y = y(1:mesh.Np);
        elem_re = mesh.elem(:, 1:3);
    elseif strcmp(basis_type, "P1b")
        mod = [1, 2, 4;
            2, 3, 4;
            3, 1, 4];
        elem_re = reshape(mesh.elem(:, mod(:)), 3*mesh.Ne, 3);
    elseif strcmp(basis_type, "P2")
        mod = [1, 4, 6;
            2, 5, 4;
            3, 6, 5;
            4, 5, 6];
        elem_re = reshape(mesh.elem(:, mod(:)), 4*mesh.Ne, 3);
    end
    trisurf(elem_re, x, y, U);
else
    figure;
    scatter3(x, y, U, 20, U, 'filled');
end
colormap('parula');
colorbar;
title(['Example: ', num2str(pde.index)]);
xlabel('x');
ylabel('y');
zlabel('uh');
axis("equal", "tight");
end